#region License Revision: 0 Last Revised: 6/18/2008 11:00 AM
/******************************************************************************
Copyright (c) Microsoft Corporation.  All rights reserved.


This file is licensed under the Microsoft Public License (Ms-PL). A copy of the Ms-PL should accompany this file. 
If it does not, you can obtain a copy from: 

http://www.microsoft.com/resources/sharedsource/licensingbasics/publiclicense.mspx
******************************************************************************/
#endregion // License
using System;
using System.Windows.Browser;
using System.Diagnostics;
using ScriptInterop;

namespace VIEWS // Virtual Earth Wrapper
{

/// <summary>Contains the exception information for the map control.</summary>
public class VEException : JSObject
{
	/// <summary>String holding JavaScript class name</summary>
	private static string thisClass = "VEException";
	
	/// <summary>Get the JavaScript class name</summary>
	/// <returns type="String">The class name used in JavaScript </returns>		
	public override string ClassName
	{
		get { return thisClass; }
	}

	/// <summary>Construct a C# wrapper from a ScriptObject</summary>
	/// <param name="so">A ScriptObjet from JScript.</param>
	public VEException(ScriptObject so) : base(so) { }

	/// <summary>Contains the exception information for the map control.</summary>
	/// <param name="source">The source object that caused the exception.</param>  
	/// <param name="name">The name of the exception.</param>  
	/// <param name="message">A text description of the exception.</param>		
	public VEException(string source, string name, string message)
	{
		ScriptObject = CreateClass(source, name, message);
	}

	/// <summary name="message">A text description of the exception.</summary>		
	public string Message
	{
		get { return GetProperty<string>("message"); }
		set { SetProperty("message", value); }
	}
	/// <summary name="name">The name of the exception.</summary>  
	public string Name
	{
		get { return GetProperty<string>("name"); }
		set { SetProperty("name", value); }
	}
	/// <summary name="source">The source object that caused the exception.</summary>  
	public string Source
	{
		get { return GetProperty<string>("source"); }
		set { SetProperty("source", value); }
	}
 }

}
